package com.cdshop.dao;

import com.cdshop.comm.ApplicationException;
import com.cdshop.entity.AbstractEntity;
import com.cdshop.jdbc.JdbcExecutor;

public abstract class AbstractDAO<T extends AbstractEntity> {

	protected final JdbcExecutor dbService = JdbcExecutor.instance();

	/***********************************************************
	 * Method for DAO
	 ***********************************************************/
	public abstract T create(T entity) throws ApplicationException;

	public abstract T retrive(long id) throws ApplicationException;

	public abstract T update(T entity) throws ApplicationException;

	public abstract T delete(T entity) throws ApplicationException;

}
